package com.xsmart.oa.api;

import com.xsmart.common.entity.RequestBean;
import com.xsmart.common.entity.ResponseBean;
import com.xsmart.oa.services.DistributeCountReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xuqinyuan
 */
@RestController
@RequestMapping("/api")
public class DistributeCountReportController {
    @Autowired
    DistributeCountReportService distributeCountReportService;

    /**查询分销商统计报表
     * @param requestBean
     * @param request
     * @return
     */
    @PostMapping(value = "/v1/DistributeCountReportService/queryCountReport")
    public ResponseBean queryCountReport(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return distributeCountReportService.queryCountReport(requestBean);
    }


    /**查询分销商报表销售商品清单
     * @param requestBean
     * @param request
     * @return
     */
    @PostMapping(value = "/v1/DistributeCountReportService/queryCountReportGoodsList")
    public ResponseBean queryCountReportGoodsList(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return distributeCountReportService.queryCountReportGoodsList(requestBean);
    }
}
